Skip to content

Conversation

@yudataguy
Copy link
Collaborator

Added v4 board definition. Still several points unclear

  • remove gpio expander
  • remove TCA if there
  • Change SOC to 2040
  • remove power monitor
  • update settings.ini

haven't build yet, feedback welcome

@ineskhou
Copy link
Contributor

ineskhou commented Sep 20, 2025

Ran it on my machine! Looks great formatting wise, a few suggestions

  • Intuition is correct on using m0p for the RP2040, moving from the Cortex-m33 to the m0+ but you need to also create targets for that. Check out v5d_rp2350a_m33 files!
  • Maybe we should talk about this in the discord a bit more, but I think there is no need to have v4b be a variant of v4. We could just have one entire board file for the v4b and that would be a bit cleaner to look though. I don't think its very likley we will ever support any other boards.

but yea formatting is great looking really good! Sorry for adding the commits, I was just trying to experiement with what was missing!

@yudataguy
Copy link
Collaborator Author

@ineskhou Updated the filenames, hopefully this is complete for now.

@yudataguy yudataguy requested review from Mikefly123 and ineskhou and removed request for Mikefly123 and ineskhou September 23, 2025 02:18
@ineskhou
Copy link
Contributor

Update on my comments from before, it seems that we do not need the m0p definitions/format. Apologies for that -- I saw the settings.ini had rp2040/m0p, but we can just return to the rp2040 definition like in the
added rp2040 commit -- this generates successfully.

You will run into build issues, but that's probably specifically because of the board definitions and not because of the exclusion of the m0p from my understanding? Mahdav said he would take a look at the build issues, and I will try to look at it later tonight as well

board_runner_args(uf2 "--board-id=RP2340")
if(BOARD MATCHES "^proves_flight_control_board_v4")
board_runner_args(openocd --cmd-pre-init "source [find target/rp2040.cfg]")
board_runner_args(jlink "--device=RP2040_M0_0")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ineskhou Is this what you're referring to?

@@ -0,0 +1,22 @@
identifier: proves_flight_control_board_v4b/rp2040/m0p
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ineskhou is this what you're referring to?

settings.ini Outdated
FPRIME_ENABLE_AUTOCODER_UTS=OFF
BOARD_ROOT=.
BOARD=proves_flight_control_board_v5c/rp2350a/m33
BOARD=proves_flight_control_board_v4b/rp2040/m0p
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too @ineskhou

Copy link
Contributor

@ineskhou ineskhou Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes here! Settings.ini -- and you should probably make sure the others match up but it should say:

"proves_flight_control_board_v4b/rp2040"

This will generate correctly (it does on mine) unlike the other commits. there will be build errors but from talking to Mahdav I believe those are just things missing in the device tree

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea on how to fix the device tree?

Copy link
Contributor

@Mikefly123 Mikefly123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @yudataguy! I went through and made some recommendations on changes to the board definition to match the pinout on the V4b Flight Controller Boards.

Reference V4b RP2040 Pinout Screenshot

Screenshot 2025-09-23 at 1 23 04 PM

compatible = "semtech,sx1276";
reg = <0>;
spi-max-frequency = <125000>;
dio-gpios = <&gpio0 13 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,<&gpio0 12 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we reached the conclusion last week that we would only be using the DIO0 part of the library for now. On V4b boards this is the pin location:

Suggested change
dio-gpios = <&gpio0 13 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,<&gpio0 12 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
dio-gpios = <&gpio0 23 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;

reg = <0>;
spi-max-frequency = <125000>;
dio-gpios = <&gpio0 13 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,<&gpio0 12 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also different from V5 to V4

Suggested change
reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;

Comment on lines 125 to 131
ina219: ina219@40 {
compatible = "ti,ina219";
reg = <0x40>;
shunt-milliohm = <2>;
lsb-microamp = <100>;
label = "INA219";
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no onboard INA219 on the V4 Flight Controller Board.

Suggested change
ina219: ina219@40 {
compatible = "ti,ina219";
reg = <0x40>;
shunt-milliohm = <2>;
lsb-microamp = <100>;
label = "INA219";
};

@ineskhou ineskhou closed this Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants